﻿{% extends "forum/base.html" %}
{% load customfilters %}

{% block title %}
DjangoPower论坛
{% endblock %}

{% block content %}
<table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tr>
        <td width="80%" valign="top">
	    <form name="ucp" id="ucp" method="post" action=".">
                <table class="tablebg" width="100%" cellspacing="1">
                    <tr>
	                <th colspan="2" valign="middle">我的个人资料</th>
                    </tr>

                    <tr> 
	                <td class="row1" width="35%"><b class="genmed">用户名: </b></td>
	                <td class="row2">{{user.username}}&nbsp;{% if savesuccess %}恭喜你,保存成功!{% endif %}</td>
                    </tr>
                    <tr> 
	                <td class="row1" width="35%"><b class="genmed">论坛等级: </b></td>
	                <td class="row2">{{user|profile:"rank"}}</td>
                    </tr>
		    <tr> 
	                <td class="row1" width="35%"><b class="genmed">论坛文章: </b></td>
	                <td class="row2">{{user|profile:"posts"}}</td>
                    </tr>
                    <tr> 
	                <td class="row1" width="35%"><b class="genmed">加入时间: </b></td>
	                <td class="row2">{{user.date_joined|date:"Y-m-d H:i"}}</td>
                    </tr>
                    <tr> 
	                <td class="row1" width="35%"><b class="genmed">来自: </b></td>
	                <td class="row2">
			<select class="post" name="city">
			    <option value="北京">北京</option>
                            <option value="上海">上海</option>
                            <option value="深圳">深圳</option>
			    <option value="广州">广州</option>
			    <option value="成都">成都</option>
			    <option value="杭州">杭州</option>
			    <option value="大连">大连</option>
			    <option value="南京">南京</option>
			    <option value="珠海">珠海</option>
			    <option value="武汉">武汉</option>
			    <option value="西安">西安</option>
			    <option value="重庆">重庆</option>
			    <option value="其他">其他</option>
		        </select>
			</td>
                    </tr>
                    <tr> 
	                <td class="row1" width="35%"><b class="genmed">性别: </b></td>
	                <td class="row2">
			<select class="post" name="sex">
                            {% ifequal user|profile:"sex" '男' %}
                            <option value="男" selected="selected">男</option>
                            {% else%}
                            <option value="男">男</option>
                            {% endifequal%}
			    {% ifequal user|profile:"sex" '女' %}
                            <option value="女" selected="selected">女</option>
                            {% else%}
                            <option value="女">女</option>
                            {% endifequal%}
                                                        
		        </select>
			</td>
                    </tr>
                    <tr> 
	                <td class="row1" width="35%"><b class="genmed">个人主页: </b></td>
	                <td class="row2">http://{{form.homepage}}</td>
                    </tr>
                    
                    <tr> 
	                <td class="row1" width="35%"><b class="genmed">自我介绍: </b></td>
	                <td class="row2">{{form.description}}</td>
                    </tr>
		    <tr> 
	                <td class="row1" width="35%"><b class="genmed">电子邮件: </b></td>
	                <td class="row2">{{form.email}}&nbsp;{{form.email.errors}}</td>
                    </tr>
                    <tr> 
	                <td class="row1" width="35%"><b class="genmed">新密码: </b></td>
	                <td class="row2">{{form.password}}&nbsp;此项为空表示不修改密码</td>
                    </tr>
		    <tr> 
	                <td class="row1" width="35%"><b class="genmed">新密码确认: </b></td>
	                <td class="row2">{{form.password1}}</td>
                    </tr>
                    <tr>
	                <td class="cat" colspan="2" align="center"><input class="btnmain" type="submit" name="submit" value="确认提交" />&nbsp;&nbsp;
			{% if passerror %}两次输入密码不匹配{% endif %}
			</td>
                    </tr>
                </table>
     	    </form>
	</td>
    </tr>
</table>

<br clear="all" />

<div align="right"></div>


{% endblock %}